﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using System.Windows.Threading;
using ClassFolio;

namespace GeneFolio
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
		void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
        {
            switch (e.Exception.GetType().Name)
            {
                case "EFolio":
                case "EFolioSource":
                case "EFolioUsers":
                    EFolio.HandledError(((EFolio)e.Exception).MessageType, e.Exception, e.Exception.Message);
                    break;
                default:
                    EFolio.UnHandledError(e.Exception, e.Exception.Message);
                    break;
            }
            e.Handled = true;
        }

	}
}
